One issue that arises in the operation of image sensors is the need to perform lens shading correction. An image sensor typically has a two-dimensional array of photo-sensitive pixels. An optical assembly may include a lens and a micro-lens array to focus light onto individual pixels. However, various imperfections in the optical assembly create a shading effect. One common shading effect is that that the image is brighter in the center and decreases in brightness at the edges of the pixel array. More generally there will be a two-dimensional variation in shading across the array of pixels caused by the optical elements in the optical assembly and the difficulties in uniformly projecting an image across the field of view of the image sensor. Additionally, in the most general case shading effects may be asymmetric. For example, one edge may be shaded more than another if there is imperfect optical alignment and/or optical imperfections in optical components.
Uncorrected shading effects can result in undesirable variations in intensity across an image that may be discernable to an end user. Lens shading correction algorithms are used to correct for shading in an image sensor. Empirical data is used to determine coefficients of a gain correction function that is used to adjust the gain of individual pixels to compensate for the lens shading. Two common conventional solutions to correct lens shading in image sensor chips include the symmetric method and the two direction multiplication method. Both of these conventional solutions have significant drawbacks.
The symmetric method presumes that lens shading is circularly symmetric. That is, the symmetric method presumes that shading depends only on a radial distance from an optical center point in the image sensor. Consequently, the symmetric method utilizes one quadratic polynomial in r, the radius, to compensate for the shading. The correction equation for the symmetric method is G=a*r*r+b*r+1, r=(x*x+y*y)^0.5, where r is the radius, a and b are correction factors, and the radius depends on x and y in accordance with a conventional conversion between Cartesian and circular coordinate systems. However, note that the symmetric method presumes that there is nearly perfect radial optical alignment of all optical components and that the optical components possess a nearly perfect radial symmetry. However, these fundamental assumptions underlying the symmetric method are not valid for many types of packaged image sensors unless special attention is taken in the design of the optical components. Studies by the inventors indicate that the symmetric method often generates poor correction results for a variety of packaged image sensors.
The two-direction multiplication method assumes that lens shading can be compensated by a 2-dimensional correction function F(x,y), having a profile in both the x and y directions that is a quadratic polynomial with coefficients independently programmable in each direction. The correction equation for the two direction multiplication method is G=F(x,y)=h(x)*v(y) where h(x) and v(y) are each piecewise quadratic polynomials and F(x,y) is the product of the two quadratic polynomials h(x) and v(y). However, a drawback of this approach is that it is difficult to accurately correct the entire image. In particular, investigations by the inventors indicate that a single quadratic polynomial that properly corrects the center of the image will often not adequately correct the corner regions of the image sensor.
Therefore in light of the above-described problems a new apparatus, system and method for lens shading image correction in image sensors is desired.